" Parses a lyrics file"
class LRCParser:
    def __init__(self, lrc):
        self.lrcFile=open(lrc,'r')
        self.lyrics={}

    def parse(self):
        for line in self.lrcFile:
            index = line.find(' ')

            time = line[:index].split(':')
            lyric = line[index+1:-1]

            mins = int(time[0][1:])
            secs = float(time[1][:-1])

            self.lyrics[mins*60+secs] = lyric

        self.times=self.lyrics.keys()
        self.times.sort()

        return self.times, self.lyrics

if __name__ == "__main__":
    LRCParser("lyric.lrc")
